package com.bwstudio.common.autoidempotent.exception;

import com.bwstudio.common.response.ErrorCodeI;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author buwei
 */ //@AllArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
public class AutoIdempotentException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private String code;

    private String message;


    public AutoIdempotentException(ErrorCodeI resultCode) {
        this.code = resultCode.getCode();
        this.message = resultCode.getMessage();
    }

}
